#include <qlib/geo/fly_line.h>

namespace qlib {

FlyLine::FlyLine() {
  m_flexpath = std::make_shared<Path>();
  m_flexpath->spine.points.resize(2);
}
FlyLine::~FlyLine() {}

FlyLine::s_ptr FlyLine::copy() const {
  return std::make_shared<FlyLine>(*this);
};

std::vector<Vec2d> FlyLine::get_points() {
  return m_flexpath->spine.points;
}
Vec2d FlyLine::getPinPoint(const std::string& pin_name) {
  Vec2d res;
  if (pin_name == pin_1) {
    res = m_flexpath->spine.points[0];
  }
  if (pin_name == pin_2) {
    res = m_flexpath->spine.points[1];
  }
  return res;
}
Vec2dArray FlyLine::bounding_box() {
  Vec2dArray res = m_flexpath->bounding_box();
  return res;
}

void FlyLine::transform(double magnification, bool x_reflection, double rotation, const Vec2d origin) {}
void FlyLine::rotate(double angle, Vec2d center) {}
void FlyLine::translate(double dx, double dy) {}
void FlyLine::mirror(qlib::Vec2d p0, qlib::Vec2d p1) {}

}  // namespace qlib